package test;

abstract class Animal{
    protected boolean hungry=true;
}
interface Feedable{

    public default void feed(){
        System.out.println("No method for feeding!");
    }
}
class Cat extends Animal implements Feedable{

}
public class InterfaceExample1 {
    public static void main(String[] args)
    {
        Cat cat=new Cat();
        cat.feed();
        System.out.print("Is the cat hungry? ");
        System.out.println(cat.hungry?"Yes":"No");
    }

}
